<?php include_stylesheets_for_form($form) ?>
<?php include_javascripts_for_form($form) ?>
<h1><?php echo __(($form->getObject()->isNew())?'New Category':'Edit Category'); ?></h1>
<form action="<?php echo url_for('content/update'.(!$form->getObject()->isNew() ? '?id='.$form->getObject()->getId() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<?php endif; ?>
<?php echo $form->renderGlobalErrors(); ?>
  <table>
    <tfoot>
      <tr>
        <td colspan="2">
          <?php echo $form['id'] ?>
          <?php echo $form['category_id'] ?>
          <?php echo $form['_csrf_token'] ?>
          &nbsp;<a href="<?php echo url_for('category/index') ?>">Cancel</a>
          <?php if (!$form->getObject()->isNew()): ?>
            &nbsp;<?php echo link_to('Delete', 'content/delete?id='.$form->getObject()->getId(), array('method' => 'delete', 'confirm' => 'Are you sure?')) ?>
          <?php endif; ?>
          <input type="submit" value="Save" />
        </td>
      </tr>
    </tfoot>
    <tbody>
      <?php foreach ($languages as $lang) : ?>
      <tr>
         <th><?php echo $lang; ?></th>
         <td> <?php echo $form[$lang] ?> <?php echo $form[$lang]->renderError() ?> </td>
      </tr>
      <?php endforeach; ?>
    </tbody>
  </table>
</form>
